<?php

namespace api\models;

use Yii;

/**
 * This is the model class for table "{{%depart_list}}".
 *
 * @property int $id
 * @property string $name
 * @property bool $createDeptGroup
 * @property int $depart_id
 * @property bool $autoAddUser
 * @property bool $delete
 */
class DepartList extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%depart_list}}';
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'createDeptGroup', 'depart_id', 'autoAddUser', 'delete'], 'required'],
            [['createDeptGroup', 'autoAddUser', 'delete'], 'boolean'],
            [['depart_id'], 'default', 'value' => null],
            [['depart_id'], 'integer'],
            [['name'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', 'Name'),
            'createDeptGroup' => Yii::t('app', 'Create Dept Group'),
            'depart_id' => Yii::t('app', 'Depart ID'),
            'autoAddUser' => Yii::t('app', 'Auto Add User'),
            'delete' => Yii::t('app', 'Delete'),
        ];
    }
}
